package com.yilin.tms.core.entity.system.handle;


import com.baomidou.mybatisplus.annotation.EnumValue;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yilin.tms.core.commons.base.BaseDataEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * 用户意见反馈表
 *
 * @author zhangjinyuan
 * @date 2022/7/7
 */
@Entity
@Table(name = "sys_feedback")
@TableName("sys_feedback")
public class Feedback extends BaseDataEntity {

    //反馈状态
    public enum BackState {
        waiting(0, "等待处理"),
        complete(1, "完成");
        @EnumValue
        public Integer index;
        public String name;

        BackState(Integer index, String name) {
            this.index = index;
            this.name = name;
        }
    }

    /**
     * 基本信息
     */
    //标题
    @Column(name = "title")
    private String title;
    //内容
    @Column(name = "context")
    private String context;
    //图片
    @Column(name = "img_url", columnDefinition = "TEXT")
    private String imgUrl;
    /**
     * 反馈人信息
     */
    //反馈人ID
    @Column(name = "account_id")
    private String accountId;
    //反馈人名称
    @Column(name = "account_name")
    private String accountName;
    //反馈人电话
    @Column(name = "account_phone")
    private String accountPhone;
    /**
     * 处理结果
     */
    //处理时间
    @Column(name = "complete_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date completeTime;
    //处理人Id
    @Column(name = "deal_account_id")
    private String dealAccountId;
    //处理人名称
    @Column(name = "deal_account_name")
    private String dealAccountName;
    //处理结果
    @Column(name = "back_state")
    private BackState backState;

    public String getDealAccountId() {
        return dealAccountId;
    }

    public void setDealAccountId(String dealAccountId) {
        this.dealAccountId = dealAccountId;
    }

    public String getDealAccountName() {
        return dealAccountName;
    }

    public void setDealAccountName(String dealAccountName) {
        this.dealAccountName = dealAccountName;
    }

    public BackState getBackState() {
        return backState;
    }

    public void setBackState(BackState backState) {
        this.backState = backState;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContext() {
        return context;
    }

    public void setContext(String context) {
        this.context = context;
    }

    public String getImgUrl() {
        return imgUrl;
    }

    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }

    public Date getCompleteTime() {
        return completeTime;
    }

    public void setCompleteTime(Date completeTime) {
        this.completeTime = completeTime;
    }

    public String getAccountId() {
        return accountId;
    }

    public void setAccountId(String accountId) {
        this.accountId = accountId;
    }

    public String getAccountName() {
        return accountName;
    }

    public void setAccountName(String accountName) {
        this.accountName = accountName;
    }

    public String getAccountPhone() {
        return accountPhone;
    }

    public void setAccountPhone(String accountPhone) {
        this.accountPhone = accountPhone;
    }
}
